Marshaling (or marshalling) is the process of transforming the memory representation of an object to a data format suitable for storage or transmission. Marshaling is a process that is used to communicate to remote objects with an object (such as a serialized object). It simplifies complex communication, using custom/complex objects to communicate instead of primitives. Once a marshaled object is sent to storage or transmitted, it can often be un-marshaled into the original object. Marshaling is typically used when data is moved from one program to another or between different parts of a computer program. Other marshaling scenarios include marshaling objects between garbage collection-based environments and reference counting-based environments.
One suitable use for marshaling objects is to transfer objects between components in a distributed computing application. Distributed computing applications are often deployed into environments having a multitude of different technologies and services that are used to form building blocks of the applications. A distributed application is typically comprised of a set of components, spread across tiers, which interact to perform work. Some applications run in a cloud-computing environment, others run on the premises of the entity or user, and others span these environments. Often, it is difficult to cleanly separate the various layers of the application between computers. For example, a given piece of functionality may be implemented in a client process for some scenarios, but in the server process for other scenarios. Further, the environment may change as an application evolves, the number of users change, or the locations of the users become dispersed.
One desirable characteristic of a distributed application is its ability to scale, or to cost-effectively change with the enterprise or user demand for services of the application. Typical object-based marshaling systems, however, can become inefficient when used in applications where distinctions between layers are blurred or are used on high latency networks such as the Internet and others, which can make scaling such systems difficult and introduce other issues.